Skip to content

fix(dictation): allow concurrent live uploads - #316

Open
zkasuran wants to merge 1 commit into
AssemblyAI:masterfrom
zkasuran:fix/dictation-small-host-workers
Open

zkasuran wants to merge 1 commit into
AssemblyAI:masterfrom
zkasuran:fix/dictation-small-host-workers

Conversation

@zkasuran

@zkasuran zkasuran commented Nov 26, 2026 •

Copy link
Copy Markdown

Fixes #302.

DictationTranscriber.open_live() holds a worker while a recording is open. With one or two CPUs, the default pool has one worker, so the second recording buffers locally until the first ends.

Set the default floor to two workers. Explicit max_workers and the default on larger hosts keep their existing behavior. The docstrings now say a request starts when a worker is available.

The offline regression records when the fake transport consumes each session's first chunk. It fails on the base for one CPU, two CPUs and an unknown CPU count. The explicit two-worker control passes on the base. All four cases pass with the fix.

  • 1,038 offline unit tests passed in each of Python 3.11, Python 3.12 and a Python 3.11 run with httpx 0.22, Pydantic 1.10 and websockets 11.
  • Ruff, changed-source mypy, API reference and wheel build passed. No AssemblyAI API calls.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DictationTranscriber default max_workers = cpu_count-1 serializes concurrent open_live() sessions on 1-2 vCPU hosts

1 participant